/**
 * Copyright 2020 OPSLI 快速开发平台 https://www.opsli.com
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.opsli.api.wrapper.shop.userorder;

import java.math.BigDecimal;
import java.util.Date;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.opsli.api.base.warpper.ApiWrapper;
import org.opsli.api.wrapper.shop.device.SysShopDeviceModel;
import org.opsli.api.wrapper.system.org.SysOrgModel;
import org.opsli.common.annotation.validator.Validator;
import org.opsli.common.annotation.validator.ValidatorLenMax;
import org.opsli.common.annotation.validator.ValidatorLenMin;
import org.opsli.common.enums.ValidatorType;
import org.opsli.plugins.excel.annotation.ExcelInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

/**
* 用户订单 Model
*
* @author 17607080935
* @date 2025-01-08 15:52:29
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class SysUserOrderModel extends ApiWrapper {



    SysOrgModel sysOrgModel;

    SysShopDeviceModel sysShopDeviceModel;

    /** 用户id */
    @ApiModelProperty(value = "用户id")
    @ExcelProperty(value = "用户id", order = 1)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(22)
    private String userId;


    /** 订单实际开始时间 */
    @ApiModelProperty(value = "订单开始时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yy-MM-dd HH:mm")
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    Date startTime;


    /** 订单实际结束时间 */
    @JsonFormat(timezone = "GMT+8", pattern = "yy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yy-MM-dd HH:mm")
    @ApiModelProperty(value = "订单结束时间")
    Date endTime;

    /** 订单预约开始时间 */
    @JsonFormat(timezone = "GMT+8", pattern = "yy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yy-MM-dd HH:mm")
    @ApiModelProperty(value = "订单预约开始时间")

    Date resStartTime;
    /** 订单预约结束时间 */

    @ApiModelProperty(value = "订单预约结束时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yy-MM-dd HH:mm")
    Date resEndTime;


    /** 订单类型 */
    @ApiModelProperty(value = "订单类型")
    @ExcelProperty(value = "订单类型", order = 2)
    @ExcelInfo( dictType = "user_order_type" )
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(2)
    private String type ="1";

    /** 商品id */
    @ApiModelProperty(value = "商品id")
    @ExcelProperty(value = "商品id", order = 3)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(22)
    private String goodId="0";

    /** 金额 */
    @ApiModelProperty(value = "金额")
    @ExcelProperty(value = "金额", order = 4)
    @ExcelInfo
    @Validator({
        ValidatorType.IS_NOT_NULL, 
        ValidatorType.IS_MONEY
    })
    @ValidatorLenMax(4)
    private BigDecimal price;

    /** 订单状态 */
    @ApiModelProperty(value = "订单状态")
    @ExcelProperty(value = "订单状态", order = 5)
    @ExcelInfo( dictType = "user_order_status" )
    @Validator({
        ValidatorType.IS_INTEGER, 
        ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(2)
    private String status ="0";


    @ApiModelProperty(value = "订单金额状态")
    @ExcelProperty(value = "订单金额状态", order = 5)
    @ExcelInfo( dictType = "user_order_price_status" )
    @Validator({
            ValidatorType.IS_INTEGER,
            ValidatorType.IS_NOT_NULL
    })
    @ValidatorLenMax(2)
    private String priceStatus ="0";

    /** 备注 */
    @ApiModelProperty(value = "备注")
    @ExcelProperty(value = "备注", order = 6)
    @ExcelInfo
    @ValidatorLenMax(225)
    private String remarks;

    /**
     * 订单时长
     */
    @Validator({
            ValidatorType.IS_INTEGER,
            ValidatorType.IS_NOT_NULL
    })
    @ApiModelProperty(value = "订单时长")
    Integer hourNumber;


    /**
     * 设备id
     */
    @Validator({
            ValidatorType.IS_NOT_NULL
    })
    private String deviceId;


    /** 多租户字段 */
    private String orgIds;

    /** 多租户字段 */
    private String tenantId;

    /** 删除 */
    private Integer delectd =0;

}